< previous page page_196 next page >

Page 196
Low-Pass Filters
A low-pass filter determines a pixel's output value by taking a symmetric average of the nearby pixels. This has a smoothing or blurring effect on the image, so these filters are sometimes called smoothing or blurring filters.
Low-frequency parts of an image are places where the colors change gradually or not at all. In high-frequency portions of an image, the colors change quickly and by large amounts. This kind of averaging filter passes low-frequency portions of the image through with little change while smoothing out higher-frequency portions.
Figure 7.2 shows program Filter applying a low-pass filter to an image. The high-frequency areas at the right and bottom of the image are blurred to an almost uniform gray. The lower-frequency areas in the upper right are still recognizable, though their edges have been softened.
The filter described earlier in this chapter, with every coefficient equal to 1/9, is one kind of low-pass filter. More generally, an N-by-N filter for which each kernel coefficient has value 1/N2 is a low-pass filter. Larger kernels soften the image more.
Other low-pass filters give extra weight to the center pixel. These ''peaked" kernels make new pixel values more closely resemble their original values while still providing some blurring. The following diagrams show two different kernels for three-by-three peaked low-pass filters.
The first kernel weighs the center pixel slightly more than its neighbors. The second kernel weighs the center pixel quite heavily, so output pixels have values very similar to their input values. The sum of the coefficients in this kernel is 1, so the center coefficient contributes (12/20)/1 = 0.6 or 60 percent of the output pixel's value.
0196-01.jpg
Figure 7.2
Low-pass filters smooth out areas of rapid change.

 
< previous page page_196 next page >